﻿<Window x:Class="OldSchoolMdiDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:OldSchoolMdiDemo"
        xmlns:msdn="clr-namespace:Microsoft.DwayneNeed.Controls;assembly=Microsoft.DwayneNeed"
        xmlns:interop="clr-namespace:System.Windows.Interop;assembly=PresentationCore"
        Title="OldSchoolMdiDemo" Height="350" Width="525">
    <UniformGrid>
        <UniformGrid.Resources>
            <Style TargetType="{x:Type msdn:ChildWindow}" x:Key="OverlappedWindow">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type msdn:ChildWindow}">
                            <Border>
                                <msdn:HwndSourceElement Source="{TemplateBinding Source}">
                                    <msdn:HwndSourceElement.CreationParameters>
                                        <interop:HwndSourceParameters WindowStyle="13565952"/>
                                    </msdn:HwndSourceElement.CreationParameters>
                                </msdn:HwndSourceElement>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </UniformGrid.Resources>
        <msdn:ChildWindow Source="Bing.xaml"/>
        <msdn:ChildWindow Style="{StaticResource OverlappedWindow}" Background="Pink" BorderBrush="Red" BorderThickness="4" Source="Bing.xaml"/>
    </UniformGrid>
</Window>
